package com.leyou.item.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leyou.item.dto.SpuDetailDTO;
import com.leyou.item.entity.Spu;
import com.leyou.item.entity.SpuDetail;
import com.leyou.item.mapper.SpuDetailMapper;
import com.leyou.item.service.SpuDetailService;
import org.springframework.stereotype.Service;

/**
 * @author ：qcq
 * @date ：Created in 2020/12/7 11:32
 * @description：
 */
@Service
public class SpuDetailServiceImpl extends ServiceImpl<SpuDetailMapper, SpuDetail> implements SpuDetailService {

    @Override
    public SpuDetailDTO querySpuDetailBySpuId(Long id) {
        SpuDetail spuDetail = this.getById(id);
        SpuDetailDTO spuDetailDTO = new SpuDetailDTO(spuDetail);
        return spuDetailDTO;
    }
}
